import { networkRequest, baseRequestConfig, sessionConfig, uploadFileConfig } from './RequestConfig'

//获取session
export const getSession = (params) => {
    sessionConfig.url = '/SZCG/MAIN/000_000_000'
    sessionConfig.data = params
    return networkRequest(
        sessionConfig
    )
}

//获取验证码
export const getVerificationCode = (params) => {
    baseRequestConfig.url = '/SZCG/MAIN/000_000_003';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}

//操作定时任务
export const editTask = (params) => {
    baseRequestConfig.url = '/SZCG/MAIN/000_000_001';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}

//登录
export const startLogin = (params) => {
    baseRequestConfig.url = '/SZCG/MAIN/000_000_002';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}

//获取全部cron表达式
export const getAllcronExpression = (params) => {
    baseRequestConfig.url = '/SZCG/MAIN/000_000_007';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}

//获取任务日志
export const getTaskLog = (params) => {
    baseRequestConfig.url = '/SZCG/MAIN/000_000_008';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}

//删除任务日志
export const deleteTaskLog = (params) => {
    baseRequestConfig.url = '/SZCG/MAIN/000_000_009';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}

//创建cron表达式
export const creatCron = (params) => {
    baseRequestConfig.url = '/SZCG/MAIN/000_000_010';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}

//获取上传文件凭证
export const getUploadPermit = (params) => {
    baseRequestConfig.url = '/SZCG/MAIN/000_000_004';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}

//文件上传
export const uploadFileReq = (params) => {
    uploadFileConfig.url = '/SZCG/UPLOAD/001_000_001';
    uploadFileConfig.permit = params.get('permit');
    uploadFileConfig.data = params.get('formData');
    return networkRequest(uploadFileConfig)
}

//获取微信公众号唯一标识openid
export const getWxOpenId = (params) => {
    baseRequestConfig.url = '/SZCG/WX/003_000_000';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}

//获取微信公众js配置
export const getWxJsConfig = (params) => {
    baseRequestConfig.url = '/SZCG/WX/003_000_001';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}

//逆地理编码
export const getAddress = (params) => {
    baseRequestConfig.url = '/SZCG/WX/003_000_002';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}

//案件提交
export const submitCase = (params) => {
    baseRequestConfig.url = '/SZCG/WX/003_000_003';
    baseRequestConfig.data = params;
    return networkRequest(baseRequestConfig)
}


